package cn.wenhaha.app.data.bean.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 插件信息
 * --------
 *
 * @author ：wyndem
 * @Date ：Created in 2022-07-10 22:21
 */
@Data
public class PluginInfoDTO {
    @NotEmpty(message = "名称不能为空")
    private String name;

    private String icon = "https://i1.hdslb.com/bfs/face/1f2622612f071101764f2823387cb07f13aab80d.jpg";
    @NotEmpty(message = "作者不能为空")
    private String author;
    @NotEmpty(message = "描述不能为空")
    private String info;
    @NotEmpty(message = "版本不能为空")
    private  String version;
    @NotEmpty(message = "code不能为空")
    @Length(min = 4,max=20, message = "code长度不符合规范")
    @Pattern(regexp = "^[a-zA-Z0-9]+$",message = "code只允许英文和数字")
    private String code;
    @NotEmpty(message = "添加页面文件不能为空")
    private String addPage;
    @NotEmpty(message = "必须有更新页面文件")
    private String updatePage;

}
